#!/bin/sh
# postinst script for libada-util
#
# see: dh_installdeb(1)

set -e

if [ -f /usr/share/ada/adainclude/util.gpr ]; then

has_aws="no"
has_curl="no"
if [ -f /usr/share/ada/adainclude/util_http_curl.gpr ]; then
  has_curl="yes"
fi
if [ -f /usr/share/ada/adainclude/util_http_aws.gpr ]; then
  has_aws="yes"
fi
(echo 'with "util";';
 test "$has_curl" = "no" || echo 'with "util_http_curl";'
 test "$has_aws" = "no" || echo 'with "util_http_aws";'
 echo 'abstract project Util_Http is'
 echo '   type Yes_No is ("yes", "no");'
 echo '   Has_Curl    : Yes_No := "'$has_curl'";'
 echo '   Has_AWS     : Yes_No := "'$has_aws'";'
 echo "end Util_Http;"
)> /usr/share/ada/adainclude/util_http.gpr

fi

#DEBHELPER#

exit 0
